@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* lwtheme background */
window:-moz-lwtheme {
	background-repeat: no-repeat;
	background-position: right top;
}
#footer:-moz-lwtheme {
	background-repeat: no-repeat;
	background-position: left bottom;
}

/* titlebar */
#titlebar {
	-moz-appearance: -moz-window-titlebar !important;
}
window[sizemode="maximized"] #titlebar {
	-moz-appearance: -moz-window-titlebar-maximized !important;
}
#titlebar-buttonbox {
	-moz-appearance: -moz-window-button-box;
}
window[sizemode="maximized"] #titlebar-buttonbox {
	-moz-appearance: -moz-window-button-box-maximized;
}
#titlebar-min {
	-moz-appearance: -moz-window-button-minimize;
}
#titlebar-max {
	-moz-appearance: -moz-window-button-maximize;
}
window[sizemode="maximized"] #titlebar-max {
	-moz-appearance: -moz-window-button-store;
}
#titlebar-close {
	-moz-appearance: -moz-window-button-close;
}

/* draggable title and main toolbar */
#titlebar,
#tools {
	-moz-binding: url(chrome://global/content/bindings/toolbar.xml#toolbar-drag);
}

#toolbox,
#actionsbox,
#footer {
	background: transparent;
}

/* default style for toolbars */
#toolbox:not(:-moz-lwtheme),
#actionsbox:not(:-moz-lwtheme) {
	-moz-appearance: none;
}
#actions {
	margin-top: 24px;
	margin-left: 2px;
	-moz-appearance: none;
}
#actions:not(:-moz-window-inactive) {
	background: rgba(255,255,255,0.66);
	border-top-left-radius: 4px;
	border-bottom-left-radius: 4px;
}

#actionsbox:-moz-lwtheme {
	-moz-binding: url(chrome://dta/content/common/bindings.xml#toolbar-lwauto);
}
window[sizemode="maximized"] #titlebar {
	margin-bottom: -24px;
}

/* toolbar button styles */
#tools > toolbarbutton {
	-moz-appearance: none;
	margin: 1px 3px;
	padding: 1px 5px;
	background: rgba(151,152,153,.05)
		-moz-linear-gradient(rgba(251,252,253,.95), rgba(246,247,248,.47) 49%, rgba(231,232,233,.45) 51%, rgba(225,226,229,.3));
	background-clip: padding-box;
	border-radius: 6px;
	border: 1px solid;
	border-color: rgba(0,0,0,.12) rgba(0,0,0,.19) rgba(0,0,0,.38);
	box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
		0 0 0 2px rgba(255,255,255,.1) inset;
	color: black;
	text-shadow: 0 0 2px white;
}
#tools > toolbarbutton:not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover {
	background-color: hsla(190,60%,70%,.5);
	border-color: hsla(190,50%,65%,.8) hsla(190,50%,50%,.8) hsla(190,50%,40%,.8);
	box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
		0 0 0 1.5px rgba(255,255,255,.1) inset,
		0 0 3.5px hsl(190,90%,80%);
	-moz-transition: background-color .4s ease-in,
		border-color .3s ease-in,
		box-shadow .3s ease-in;
}
#tools > toolbarbutton:not([disabled="true"]):hover:active {
	background-color: transparent;
	border-color: rgba(0,0,0,.65) rgba(0,0,0,.55) rgba(0,0,0,.5);
	box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
		0 0 2px rgba(0,0,0,.4) inset,
		0 1px 0 rgba(255,255,255,.4);
	-moz-transition: background-color .2s ease-in,
		border-color .3s ease-in,
		box-shadow .3s ease-in;
}

toolbarbutton[disabled="true"] {
	opacity: .6;
}
#prespacer {
	width: 22px;
	display: -moz-box;
}
#tools {
	margin-bottom: 3px;
}
window[sizemode="maximized"] #tools {
	padding-top: 6px;
}
#tools[mode="icons"] {
	-moz-border-radius: 4.5px;
}

toolbarbutton > .toolbarbutton-icon {
	-moz-margin-end: 0;
}

/* specialized toolbarbutton styles */

/* special lwtheme rules */
treecol:-moz-lwtheme-brighttext {
	text-shadow: none;
}

#tooldonate:-moz-lwtheme {
	display: none;
}


/* non-compositor rules */
@media all and (-moz-windows-compositor:0) {
	window:-moz-system-metric(windows-default-theme) {
		background-color: rgb(185,209,234);
	}
	window:-moz-system-metric(windows-default-theme):-moz-window-inactive {
		background-color: rgb(215,228,242);
	}
	window[sizemode="maximized"] #titlebar:-moz-lwtheme {
		visibility: hidden;
	}
	window[sizemode="maximized"] #titlebar-buttonbox {
		visibility: visible;
		position: relative;
	}
	#titlebar-min {
		-moz-margin-end: 2px;
	}
	window[sizemode="maximized"] #donatebox {
		-moz-box-pack: end;
	}
	window[sizemode="maximized"] #tooldonate {
		list-style-image: url(chrome://dta/skin/manager/donate16.png) !important;
		-moz-image-region: rect(0px,74px,16px,0px) !important;
		-moz-margin-end: 4px;
	}
	window[sizemode="maximized"] #tooldonate:hover {
		-moz-image-region: rect(16px,74px,32px,0px) !important;
	}
	#footer {
		-moz-appearance: none;
		background-color: rgba(255, 255, 255, 0.5);
		border-radius: 4px;
		border-top-right-radius: 0px;
	}

}
/* compositor rules */
@media all and (-moz-windows-compositor) {

	/* specifity issues ahead; beware */
	#DownThemAll {
		-moz-appearance: -moz-win-glass;
	}
	#downloads {
		-moz-appearance: -moz-win-exclude-glass;
		border: 0;
	}
	window {
		background-color: transparent;
		background-image: none;
		background-repeat: repeat;
		background-attachment: scroll;
		background-position: 0% 0%;
		background-clip: border-box;
		background-origin: padding-box;
		background-size: auto auto;
	}

	window[sizemode="maximized"] #titlebar-buttonbox {
		-moz-margin-end: 3px;
	}
	.titlebar-button {
		display: none;
	}

	toolbarbutton[disabled="true"] {
		opacity: .4;
	}

	/* Artificially draw window borders that are covered by lwtheme, see bug 591930. */
	window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme {
		border-top: 2px solid;
		-moz-border-top-colors: rgb(37, 44, 51) rgba(255,255,255,.6);
	}
	window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme:-moz-window-inactive {
		-moz-border-top-colors: rgb(102, 102, 102) rgba(255,255,255,.6);
	}

	#main-window[sizemode="normal"] #titlebar-buttonbox:-moz-lwtheme {
		margin-top: -2px;
	}
	#toolbox, #actionsbox:not(:-moz-lwtheme) {
		background: transparent;
	}
	#toolbox {
		-moz-appearance: -moz-win-glass !important;
		text-shadow: 0 0 .8em white, 0 0 .8em white, 0 1px 0 rgba(255,255,255,.4);
	}

	#footer:-moz-lwtheme-lighttext {
		text-shadow: 1px 1px 1.5px black;
	}

	#footer:-moz-lwtheme-darktext {
		text-shadow: 1px 1px 1.5px gray;
	}

	#footer:not(:-moz-lwtheme) {
		text-shadow: 0pt 0pt 0.5em white, 0pt 0pt 0.5em white, 0pt 1px 0pt rgba(255, 255, 255, 0.4);
	}
	#footer:not(:-moz-lwtheme):not(:-moz-window-inactive) {
		background-color: rgba(255,255,255,.66);
		border-radius: 4px;
		border-top-right-radius: 0px;
	}

	#donatebox {
		-moz-box-pack: end;
	}
	#tooldonate {
		-moz-box-pack: end;
		list-style-image: url(chrome://dta/skin/manager/donate16.png) !important;
		-moz-image-region: rect(0px,74px,16px,0px) !important;
	}
	#tooldonate:hover {
		-moz-image-region: rect(16px,74px,32px,0px) !important;
	}
	window[sizemode="maximized"] #tooldonate:not(:-moz-lwtheme) {
		-moz-margin-end: 4px;
	}

	#titlebar {
		margin-bottom: -6px;
	}
	window:not([sizemode="maximized"]) #tools[mode="icons"] {
		margin-top: -12px;
	}

}
